Skip to content

test(bun): Fix client leakage between unit test files - #23142

Merged
Lms24 merged 1 commit into
developfrom
lms/test-bun-fix-client-leakage
Aug 7, 2026
Merged

test(bun): Fix client leakage between unit test files#23142
Lms24 merged 1 commit into
developfrom
lms/test-bun-fix-client-leakage

Conversation

@Lms24

@Lms24 Lms24 commented Aug 7, 2026

Copy link
Copy Markdown
Member

This PR fixes two issues with bun tests causing test flakes on CI:

  • clients leaked between test files which, depending on test execution order, could lead to clients being initialized with options we didn't expect in test behaviour, thus causing test fails
  • specifically, after feat(bun): Instrument outgoing fetch requests #22869, the fetch call in the http.request.headers bunserver test became instrumented in the local test assertion order but would flake on CI, likely due to different execution order. I now enabled default integrations specifically on this test so that the assertion is restored. We could have also removed the assertion, since it asserts on the test harness but it's likely a good test to have a round should our fetch integration ever break.

@Lms24
Lms24 requested a review from a team as a code owner August 7, 2026 09:39
@Lms24
Lms24 requested review from JPeer264 and mydea and removed request for a team August 7, 2026 09:39
@Lms24 Lms24 self-assigned this Aug 7, 2026
@Lms24
Lms24 enabled auto-merge (squash) August 7, 2026 09:42

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 84efba0. Configure here.

Comment thread packages/bun/test/integrations/bunserver.test.ts
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 30.34 kB - -
@sentry/browser - with treeshaking flags 28.54 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.86 kB - -
@sentry/browser (incl. Tracing) 47.81 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.82 kB - -
@sentry/browser (incl. Tracing, Profiling) 52.55 kB - -
@sentry/browser (incl. Tracing, Replay) 87.19 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 76.62 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 91.91 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 104.56 kB - -
@sentry/browser (incl. Feedback) 47.68 kB - -
@sentry/browser (incl. sendFeedback) 35.17 kB - -
@sentry/browser (incl. FeedbackAsync) 40.33 kB - -
@sentry/browser (incl. Metrics) 31.41 kB - -
@sentry/browser (incl. Logs) 31.63 kB - -
@sentry/browser (incl. Metrics & Logs) 32.32 kB - -
@sentry/react 32.15 kB - -
@sentry/react (incl. Tracing) 50.06 kB - -
@sentry/vue 35.45 kB - -
@sentry/vue (incl. Tracing) 49.82 kB - -
@sentry/svelte 30.36 kB - -
CDN Bundle 32.34 kB - -
CDN Bundle (incl. Tracing) 48.13 kB - -
CDN Bundle (incl. Logs, Metrics) 33.89 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.45 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 73.23 kB - -
CDN Bundle (incl. Tracing, Replay) 85.73 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.02 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.56 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.85 kB - -
CDN Bundle - uncompressed 95.87 kB - -
CDN Bundle (incl. Tracing) - uncompressed 143.58 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 100.49 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 147.56 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 225.19 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 262.83 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 266.8 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 276.54 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 280.49 kB - -
@sentry/nextjs (client) 52.62 kB - -
@sentry/sveltekit (client) 48.27 kB - -
@sentry/core/server 65.76 kB - -
@sentry/core/browser 51.98 kB - -
@sentry/node 119.44 kB - -
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 83.42 kB - -
@sentry/aws-serverless 92.76 kB - -
@sentry/cloudflare (withSentry) - minified 214.7 kB - -
@sentry/cloudflare (withSentry) 530.38 kB - -

View base workflow run

@Lms24
Lms24 merged commit 59b6e79 into develop Aug 7, 2026
57 checks passed
@Lms24
Lms24 deleted the lms/test-bun-fix-client-leakage branch August 7, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants